﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Interactivity;
using System.Windows;
using System.Windows.Controls.Primitives;

namespace for7raid.vkPlayer
{
    public class ClearMediaOwnerAction: TargetedTriggerAction<Popup>
    {


        public MediaItem Media
        {
            get { return (MediaItem)GetValue(MediaProperty); }
            set { SetValue(MediaProperty, value); }
        }

        // Using a DependencyProperty as the backing store for Media.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty MediaProperty =
            DependencyProperty.Register("Media", typeof(MediaItem), typeof(ClearMediaOwnerAction), new UIPropertyMetadata(null));

        
        protected override void Invoke(object parameter)
        {
            PlayerViewModel.SetMediaOwner(Media, null);
        }
    }
}
